package com.itheima.config;

import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

public class MyImportSelector implements ImportSelector {
    /**
     * 可以动态加载配置文件中的类的全限定名，当检测到内部含有这些类的全限定名时即可获取对应bean对象
     * @param annotationMetadata
     * @return
     */
    @Override
    public String[] selectImports(AnnotationMetadata annotationMetadata) {
        return new String[]{"com.itheima.pojo.Role","com.itheima.pojo.User"};
    }
}
